<div class="content-detail">
    <div class="content-detail-table">
    	<table class="table table-bordered">
    		<tr>
    			<th>Hãng sản xuất/hiệu</th>
    			<th>Model</th>
    			<th>Năm sản xuất</th>
    			<th>Tình trạng</th>
    			<th>Thời gian đã hoạt động</th>
    		</tr>
    		<tr>
    			<td><?php echo $product['Product']['manufacturer']; ?></td>
    			<td><?php echo $product['Product']['model']; ?></td>
    			<td><?php echo $product['Product']['product_year']; ?></td>
    			<td>
                    <?php echo $product['Product']['product_status']==1? "Đã qua sử dụng":"Mới 100%"; ?>
                </td>
    			<td>
                    <?php echo $product['Product']['time_used']; ?>
                    <?php echo $product['Product']['time_used_type']==1? "Năm":"Giờ"; ?>
                </td>
    		</tr>
    	</table>
            <?php if ($product['Product']['category_id']==1): ?>
                <table class="table table-bordered">
            <tr>
                <th colspan="5" style="text-align: center">Thông số cần biết</th>
            </tr>
            <tr>
                <th>Tải trọng làm việc</th>
                <th>Chiều cao làm việc</th>
                <th>Trọng tải riêng</th>
                <th>Loại vỏ/bánh</th>
                <th>Option</th>
            </tr>
            <tr>
                <td>
                    <?php echo $product['Product']['work_weight']; ?>
                    <?php echo $product['Product']['work_weight_type']==1? "m3":"Kg"; ?>
                </td>
                <td><?php echo $product['Product']['height']; ?> (m)</td>
                <td><?php echo $product['Product']['weight']; ?> (kg)</td>
                <td>
                    <?php if ($product['Product']['wheel_type']==1): ?>
                        Vỏ đặc
                    <?php elseif ($product['Product']['wheel_type']==2): ?>
                        Vỏ hơi
                    <?php else: ?>
                        Bánh xích
                    <?php endif ?>
                </td>
                <td>
                    <?php
                    switch ($product['Product']['option']) {
                        case 1:
                            echo "Side Shifter";
                            break;
                        case 2:
                            echo "Fork Positioner";
                            break;
                        case 3:
                            echo "Rotating Fork";
                            break;
                        case 4:
                            echo "Hinged Fork";
                            break;
                        case 5:
                            echo "Bale Clamp";
                            break;
                        case 5:
                            echo "Roll Clamp";
                            break;
                        default:
                            echo $product['Product']['option'];
                    }
                    ?>                    
                </td>
            </tr>
        </table>
            <?php endif ?>
    	
        <label style='font-style:bold'>Thông tin về sản phẩm: </label>
        <div style='padding-bottom:20px;padding-left:20px'><?php echo nl2br($product['Product']['content']); ?></div>
        <div><?php //echo $product['Product']['content'];?></div>
    </div>
    
    <?php $image = ($this->requestAction(array('controller' => 'Images', 'action' => 'view'),array($product['Product']['product_id']))) ;
    ?>
    <?php foreach ($image as $item): ?>
        <div class="content-detail-image">
        <img src="<?php echo $item['Image']['url'] ?>" alt="">
        </div>
    <?php endforeach ?>
    
</div>